package com.fangxing.apps.example.restif;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.json.GsonJsonParser;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by fangxing on 17-6-20.
 */
@RestController
public class HelloController {
    @Autowired
    private HelloXmlService helloXmlService;

    @RequestMapping("hellostring")
    public String hello(){
        return "hello spring boot";
    }

    @RequestMapping("hellojson")
    public String helloJson(){
        //Todo 使用Gson做对象的转换
        return "json";
    }

    @RequestMapping("xmlservice")
    public String helloXmlService(){
        helloXmlService.xmlService();
        return "xml AccountService";
    }
}
